
package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.dto.DoctorQueryDto;
import com.example.demo.entity.pojo.Doctor;
import com.example.demo.entity.vo.DoctorVo;
import com.example.demo.mapper.DoctorMapper;
import com.example.demo.service.DoctorService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * @author liye
 * @description 针对表【doctor(医生信息表)】的数据库操作Service实现
 * @createDate 2025-10-09 14:21:25
 */
@Service
public class DoctorServiceImpl extends ServiceImpl<DoctorMapper, Doctor>
        implements DoctorService {

    @Resource
    private DoctorMapper doctorMapper;
    @Override
    public IPage<DoctorVo> page(DoctorQueryDto queryDto) {
        // 创建分页对象
        Page<DoctorVo> page = new Page<>(queryDto.getPageNum(), queryDto.getPageSize());

        // 执行多表联合查询
        return doctorMapper.selectDoctorVoPage(page, queryDto);
    }
}